home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -screenplay- / shareware / freeciv / readme.rulesets < prev    next >
Text File  |  2000-02-29  |  12KB  |  291 lines

  1. ----------------------------------------------------------------------
  2.                        Freeciv Rulesets
  3. ----------------------------------------------------------------------
  4.           (Originally by David Pfitzner, dwp@mso.anu.edu.au)
  5.  
  6. Quickstart:
  7. -----------
  8.  Rulesets allow modifiable sets of data for units, advances, terrain,
  9.  improvements, wonders, nations, cities and governments, without
  10.  requiring recompilation, in a way which is consistent across a
  11.  network and through savegames.  (In the future there could be other
  12.  categories of rulesets.)
  13.  
  14. - To play Freeciv normally: don't do anything special; the new
  15.   features all have defaults which give the standard Freeciv 
  16.   behaviour.
  17.  
  18. - To play a game with rules more like Civ1, start the server with:
  19.        ./ser -r data/civ1.serv
  20.   (and any other command-line arguments you normally use; depending on
  21.   how you have Freeciv installed you may have to give the installed
  22.   data directory path instead of "data").  
  23.  
  24.   Start the client normally.  The client must be network-compatible
  25.   (usually meaning the same or similar version) but otherwise nothing
  26.   special is needed.  (However some third-party rulesets may
  27.   potentially require special graphics to work properly, in which case
  28.   the client should have those graphics available and be started with
  29.   an appropriate '--tiles' argument.)
  30.  
  31.   As well as a Civ1 style as above, Freeciv now has a Civ2 style
  32.   similary, although currently it is almost identical to standard
  33.   Freeciv rules.
  34.  
  35.   Note that the Freeciv AI might not play as well with rules other
  36.   than standard Freeciv.  (See notes below.)
  37.  
  38. The rest of this file contains:
  39.  
  40. - More detailed information on creating and using custom/mixed 
  41.   rulesets.
  42.  
  43. - Information on implementation, and notes for further development.
  44.  
  45. ----------------------------------------------------------------------
  46. Using and modifying rulesets:
  47. -----------------------------
  48.  
  49. Rulesets are specified using new server options.  The command above
  50. of "./ser -r data/civ1.serv" just reads a file which sets these 
  51. options (as well as a few of the standard server options).  
  52. The new server options are:
  53.  
  54.         techs, governments, units,
  55.         buildings, terrain, nations, cities.
  56.  
  57. They are special server options in that they take string values, but 
  58. otherwise the behave like normal server options.  Eg, try the server 
  59. command "explain techs".
  60.  
  61. For each of these options, the value of the option specifies a 
  62. subdirectory of the Freeciv data directory, containing a file
  63. name techs.ruleset, units.ruleset, buildings.ruleset, etc.
  64.  
  65. Eg, the commands:
  66.    
  67.     set techs default 
  68.     set governments default 
  69.     set units civ1
  70.     set buildings custom
  71.     set terrain civ2
  72.     set nations default 
  73.     set cities default 
  74.  
  75. would specify the files:
  76.  
  77.     data/default/techs.ruleset
  78.     data/default/governments.ruleset
  79.     data/civ1/units.ruleset
  80.     data/custom/buildings.ruleset
  81.     data/civ2/terrain.ruleset
  82.     data/default/nations.ruleset
  83.     data/default/cities.ruleset
  84.  
  85. (This is just an example, and may not give very sensible rules; the
  86. directory data/custom and the file data/custom/buildings.ruleset do 
  87. not exist in standard Freeciv.)
  88.  
  89. The ruleset files in the data directory are user-editable, so you can
  90. modify them to create modified or custom rulesets (without having to
  91. recompile Freeciv).  It is suggested that you _don't_ edit the 
  92. existing files in the "default", "classic", "civ1" and "civ2"
  93. directories, but rather copy them to another directory and edit the
  94. copies.  This is so that its clear when you are using modified rules
  95. and not the standard ones.
  96.  
  97. The format used in the ruleset files should be fairly 
  98. self-explanatory.  A few points:
  99.  
  100. - The files are not all independent, since eg, units depend on
  101.   advances specified in the techs file.
  102.  
  103. - Wonders and city improvements have a new field, "variant".  This
  104.   allows limited changes to the effects of specific wonders and
  105.   improvements, where such changes have been implemented.  See the
  106.   "TODO Variants" section below for which variant effects which have
  107.   been implemented so far.
  108.  
  109. - Units have a new field, "roles", which is like "flags", but 
  110.   determines which units are used in various circumstances of the
  111.   game (rather than intrinsic properties of the unit).
  112.   See comments in common/unit.h
  113.  
  114. - The [units_adjust] section of the units file deserves some
  115.   explanation.  It contains the entries:
  116.  
  117.     max_hitpoints, max_firepower, firepower_factor.
  118.  
  119.   The first two entries (unless zero) override the hitpoints and 
  120.   firepower entries for individual units, as a convenience.  
  121.   The value of firepower_factor is used when combat is resolved:
  122.   All combat firepower values are multiplied by firepower_factor,
  123.   which means that the effective hitpoints of any unit is really 
  124.       (hitpoints/firepower_factor).
  125.   Actually, it is these effective hitpoints which are report to the
  126.   client for all hitpoint values.
  127.   (This complicated setup is so that the AI calculations don't 
  128.   blow up when using Civ1 rulesets.)
  129.  
  130. Properties of units and advances are now fairly well generalised.
  131. Properties of buildings are still rather inflexible.
  132.  
  133. ----------------------------------------------------------------------
  134. The civstyle option:
  135. --------------------
  136.  
  137. The server option civstyle still exists, but, as before, it doesn't
  138. actually do very much.  In the server, 'explain civstyle' now gives
  139. details of what exactly is affected.  Rulesets allows Civ1 style rules
  140. (to some approximation) in a more flexible way than a single server
  141. option.  Currently the civstyle option is used for minor Civ1/Civ2
  142. differences which are not covered by rulesets, but it may go away in
  143. future.
  144.  
  145. ----------------------------------------------------------------------
  146. The AI:
  147. -------
  148.  
  149. An important caveat regarding rulesets is that while rulesets allow
  150. considerable flexibility, the AI has been designed and tested using
  151. "standard Freeciv" (effectively Civ2) rules.  So the AI may not do as
  152. well with modified rules.
  153.  
  154. Some changes to the AI have been made to try to take some of the
  155. ruleset changes into account, and the combat calculations have been
  156. fudged to try to avoid core dumps, but in general you should not
  157. expect the AI to work as well with non-default options (where Civ1 is
  158. definitely included in "non-default").
  159.  
  160. Examples of problems which have not been fixed:
  161. - Units not having hitpoints in Civ1 can make a big difference to 
  162.   appropriate combat strategies.  
  163. - City walls are sufficiently different (increased build cost, and 
  164.   upkeep; and effect vs sea) to require different handling?
  165. - Without the Harbour and Offshore Platform improvements, cities with
  166.   many ocean squares are much more limited in Civ1.  
  167. - Wonders which only work on a single continent are not given special
  168.   consideration by the AI.
  169.  
  170. Hopefully this situation can be improved in the future, but the more 
  171. flexible the rules, the harder to write a good AI...
  172.  
  173. ----------------------------------------------------------------------
  174. Implementation details:
  175. -----------------------
  176.  
  177. This section and following section will be mainly of interested to
  178. developers who are familiar with the Freeciv source code.
  179.  
  180. Rulesets are mainly implemented in the server.  The server reads the
  181. files, and then sends information to the clients.  Mostly rulesets 
  182. are used to fill in the basic data tables on units etc, but in some
  183. cases some extra information is required.
  184.  
  185. For units and advances, all information regarding each unit or advance
  186. is now captured in the data tables, and these are now "fully
  187. customizable", with the old enumeration types completely removed.  For
  188. improvements and wonders, each one has a largely unique effect, so the
  189. effects themselves are still hardwired in the code.  The "variant"
  190. field now allows some flexibility, though the effects themselves must
  191. still be hard-coded.  There are some plans to improve this situation.
  192.  
  193. ----------------------------------------------------------------------
  194. TODO:
  195. -----
  196.  
  197. - More improvement and wonder variants for Civ1 (see next section).
  198. - Other alternative (non-Civ1) variants?  (If desired.)
  199. - Better: Scrap variants completely and do something more general...
  200.  
  201. - Fix up AI dynamic government choice code.
  202. - Work on making the AI handle non-default cases better.
  203. - Could have other information to help the AI?
  204.   Eg, scores for units/techs/buildings, to help the AI know which 
  205.   ones to prefer?
  206.  
  207. - Rulesets for: time progression, ...?
  208.  
  209. ----------------------------------------------------------------------
  210. TODO Variants: 
  211. --------------
  212.  
  213. First, those variants which have been implemented:
  214. (Note Variant=0 should always be "standard Freeciv" effect.)
  215.  
  216. Barracks:     Variant=0: just works for ground units (Civ2)
  217.          Variant=1: works also for air and sea units (Civ1)
  218. Barracks II, Barracks III, Sun Tzu:
  219.          These use the same variant value and effect as
  220.          Barracks.
  221. City Walls:      Variant=0: only applies against land and heli units
  222.          Variant=1: applies against sea units too
  223. Police Station:  This uses the same variant value and effect as 
  224.          Women's Suffrage (see below).
  225.  
  226. Pyramids:     Variant=0: counts as Granary in every city (Civ2)
  227.          Variant=1: allows all government types and there is 
  228.                 no transition anarchy (Civ1)
  229. United Nations:  Variant=0: units regain extra hp per turn (Freeciv)
  230.          Variant=1: allows all government types and there is 
  231.                 no transition anarchy (Civ1) (see note(*))
  232. Hoover Dam:     Variant=0: works on all cities owned
  233.          Variant=1: only works for cities on the same 
  234.                 continent as where the wonder is built
  235. J.S. Bach:     Variant=0: works on all cities owned
  236.          Variant=1: only works for cities on the same 
  237.                 continent as where the wonder is built
  238. Women's Suff.:   Variant=0: -1 unit-unhappy per City (-2 under 
  239.                 Democracy) (Freeciv)
  240.              Variant=1: -1 unit-unhappy per Unit (Civ1)
  241. Magellan's Exp.: Variant=0: gives sea units 2 extra move points
  242.          Variant=1: gives sea units only 1 extra move point
  243. Great Wall:     Uses same variant and effect as City Walls.
  244. Leo's Workshop:  Variant=0: Upgrades one obsolete unit per game turn.
  245.          Variant=1: Upgrades all obsolete units each turn.
  246.  
  247. Other differences between Civ1 and Civ2/Freeciv which have not been
  248. implemented as variants:
  249.  
  250. Copernicus' Obs.: Freeciv: science output +50% in a city
  251.           Civ1:    doubles knowledge production in city, after
  252.                all other effects.
  253. Isaac Newton's:   Freeciv: science output +100% in a city
  254.           Civ1:    "increases effects of Libraries and 
  255.                Universities" - by how much??
  256. Michelangelo's:   Freeciv: same as a Cathedral in every city
  257.           Civ1:     "increases effect of cathedrals" - by
  258.                 how much??
  259.  
  260. There are other more minor Civ1/Civ2/Freeciv differences, which 
  261. could be handled using variants, for:
  262.     Courthouse 
  263.     Cure For Cancer
  264.     Hanging Gardens
  265.     Lighthouse
  266.  
  267. Notes:
  268.  
  269. Aqueduct and Sewer System: 
  270.    The maximum sizes for cities without these improvements is handled 
  271. separately, without using variants.  This leaves variants available 
  272. if some other effects are desired.
  273.  
  274. Colosseum, Cathedral, Temple:
  275.    Note that the technology effects on the effectiveness of these
  276. buildings are not handled by variants, but by specially noting the
  277. techs; see game.rtech fields cathedral_plus, cathedral_minus,
  278. colosseum_plus, and temple_plus.  (Also applies to Michelangelo's.)
  279.  
  280. (*) United Nations: 
  281.     I'm not sure what to do here: the diplomatic effect of Civ1,Civ2 
  282. isn't appropriate for multiplayer Freeciv, and the hp effect of 
  283. Freeciv isn't appropriate for Civ1 (no hitpoints).  The govchange 
  284. effect seems reasonable -- note there is no Statue of Liberty in 
  285. Civ1, and Pyramids, which has the same effect in Civ1, becomes 
  286. obsolete.  Alternatively a Suffrage-like effect would seem sensible: 
  287. your population is more willing to go to war if it has the sanction 
  288. of the United Nations!
  289.  
  290. ----------------------------------------------------------------------
  291.